<?php include("include.php");?>
<?php 
	$pid =$_GET['pid'];
	$project = project::getProjectById($pid);
	if(isset($project)){
?>
<div class="form">
<form action="editProjectAction.php" method="post" id="editProjectForm">
<h3>Project Information</h3>
<input type="hidden" name="pid" value="<?php echo $project->getId();?>" />
<table>
	<tr>
		<td>Owner</td>
		<td><?php echo $project->getUser()->getName();?>
        	<input type="hidden" name="userid" value="<?php echo $project->getUser()->getId();?>" /></td>
	</tr>  
	<tr>
		<td>Title</td>
		<td><input type="text" maxlength="255" name="title" value="<?php echo $project->getTitle();?>"/></td>
	</tr>
    <tr>
		<td class="label">&nbsp;</td>
		<td class="input"><img onclick="javascript:document.getElementById('editProjectForm').submit();" src="images/save.png" /></td>
    </tr>    
</table> 
</form>
<?php }else{ 
	echo "<meta http-equiv=\"REFRESH\" content=\"0;url=mainDash.php\">";
}
?>
</div>
<?php include("includes/footer.php");?>